home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
set_user.zip
/
SET-USER.DOC
< prev
next >
Wrap
Text File
|
1992-06-07
|
8KB
|
159 lines
+--------------------------[ Set-User Ver 1.00 ]----------------------------+
| Written By Gary Meeker 06/07/92 Updated / / |
| SYSOP: SHARP Technical Support Line BBS Lawrenceville, GA |
| (404) 962-1788 300/1200/2400/9600 Baud. 24 Hours |
+---------------------------------------------------------------------------+
V1.00 06/07/92 - Initial release
-----------------------------------------------------------------------------
This program is released as FREEWARE to all REGISTERED PCBoard
Version 14.5(a) Sysops. The Copyright is retained by Gary Meeker.
What does this mean? If you have purchased a licence for PCBoard
V14.5(a) from Clark Development, then you are entitled to copy and use
this utility on as many computers as allowed by your licence from Clark
Development. If you have an illegal copy of PCBoard V14.5(a), this
program is not for YOU.
=========================================================================
*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*
Every effort has been made to avoid error and moderately extensive testing
has been performed on these programs, however, I do not warrant them to be
fit for any purpose or to be free from error and disclaims any liability
for actual or any other damage arising from the use of these programs.
ENSURE YOU KEEP UP-TO-DATE BACKUPS OF ALL YOUR IMPORTANT FILES.
*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*DISCLAIMER*
=========================================================================
Syntax: Set-User PCBDir ConfigFile [/Q] [/P] [/S] [/U] [/L] [/C]
Where: PCBDir = Drive:\Path to USERS.SYS file
ConfigFile = Drive:\Path\FileName.Ext of Configuration File
[/Q] = Quiet (Suppresses the progams output to the screen)
[/P] = Set Level to Password in PWRD File
[/S] = Adjust Only USERS.SYS File if USERS file SecLevel is higher
[/U] = Adjust Only USERS File if USERS.SYS file SecLevel is higher
If neither /S or /U then adjust to the higher of the two
[/L] = Use the lower level
[/C] = Clear Update status in USERS.SYS if USERS is changed
Set-User is designed to update either USERS.SYS or USERS file to the higher
Security Level of the two files. When running two (or more) Door programs from
a single Door Batch file, it is possible to run into problems if the programs
use different methods for updating the Users security level. Some programs will
update USERS.SYS and some will update USERS directly.
When the batch file returns to PCBoard, it will update the USERS file to the
level in USERS.SYS, possibly overwriting a higher level level granted by a
program that was run later. By running Set-User after each Door program, you
can be assured that the higher of the two security levels will be retained.
Also, some Door programs only work if the User has the proper security level
to use the Door, but if after the first program runs, the USERS file does not
get updated, the second program doesn't see the change and refuses to run.
Set-User will cure this problem also.
If you want to control the updating of security levels, you can use /S to
force Set-User to update USERS.SYS file only if the USERS file has a higher
security level, but not to update USERS file if USERS.SYS has the higher.
Likewise, you can use /U to update USERS file only if the USERS.SYS file has
a higher security level, but not to update USERS.SYS file if USERS has the
higher. Used without either parameter, Set-User will always adjust the file
with the lower level to that of the higher level. Using /L will adjust to the
lower of the two levels incase you have a need to do this.
In case the first program changes the conference flags and you don't want the
second program to destroy those settings, you add the /C parameter when running
Set-User after the second door runs. This will clear the Updated status in
USERS.SYS so PCBoard will not make any further changes from the file when it
reloads. Since Set-User will have updated USERS from USERS.SYS and nothing else
will be needed from USERS.SYS (hopefully), this should cure this problem also.
Eventually, I will get the PCBoard Toolkit (if it gets ported over to Microsoft
C++) and turn this utility into a full USERS.SYS flusher. This will update
USERS & USERS.INF with any changes from USERS.SYS just like when you actually
return to the board, or if the file has not been updated, refresh it from
USERS & USERS.INF just like PCBoard does when it creates the file in the first
place in case a Door or other utility has made a change directly to the User
files.
A second mode of operation is to use the /P option. This causes Set-User to
read the PWRD file and if the Users Password matches one of the Passwords in
this file, the Users security level will be set to the corresponding Security
Level. Only the USERS.SYS file is updated and Set-User will exit with an
ErrorLevel equal to the Security Level the User was assigned. This allows
you to perform a test in the Door Batch file and return right to the Board,
Bypassing the normal InstaReg/Verify Door type of set up.
NOTE: No USERS.SYS file exists during $$LOGON.BAT so if you were thinking of
some way to use this program in that batch file, get it out of your head
right now! Also you MUST set your Door up to create the USERS.SYS file,
even if the Door itself doesn't need it, cause Set-User does.
The configuration file consists of 5 lines:
Line 1: Drive:\Path\Filename of USERS File
Line 2: Drive:\Path\Filename of PWRD File
Line 3: Drive:\Path\Filename of TextFile to notify User of Update
Line 4: Security Level Limit (1-255)
Line 5: Set Expiration Level (YES/NO)
The TextFile in line 3 is a file which if specified will be copied to
PCBDOOR.TXT to be displayed to the User upon return to PCBoard. It is
only for use when the /P parameter is used, and will be copied only if
Set-User finds a password match. Since PCBoard does the displaying of
either of the text file, you may use @Xnn color codes or any of the
@variable@ codes you would like. This allows displaying useful information
to the user.
The Security Level Limit in line 4 is for use with the /P parameter also
and sets a limit for the Users level to be raised to by Set-User when a
password match is found. If the match is found on a security level higher
than this limit, then no action is taken (Set-User considers this a no match
condition).
Set Expiration Level in line 5 is also for use with /P parameter and if set
to YES it will cause Set-User to adjust the Expired Security Level to the
same level as Security Level if a password match is found.
A typical entry in an INSTAREG door file would look like this
Set-User %PCBDRIVE%%PCBDIR% C:\PCB\Set-User.CFG /P
IF ERRORLEVEL 1 GOTO Exit
=========================================================================
CONTACTING THE AUTHOR
There are a number of ways to contact the author:
1. Call the support BBS, SHARP Technical Support Line BBS (404) 962-1788.
2. Fax: (404) 995-0613
3. Send net mail message through one of the mail networks in a CD-Rom
Sysops, PCBoard, QuickBasic or TeleMate Conference addressed to 'Gary Meeker'.
Available networks are Intelec, Rime, ILink and P/Net. Although I sometimes
do not get on the networks for a couple months at a time, so my BBS or P/NET
which I do carry on my BBS is the quickest bet.
4. Send letter through regular post to the following address:
ATTN: Gary Meeker
SHARP Technical Support Line BBS
725-C Old Norcross Road
Lawrenceville, GA 30245
=========================================================================
The file was compiled with PDQ for small size and fast operation. The source is
included (although unless you have Crescent's QuickPack Professional libraries
you won't be able to compile it without changing the references to the
routines I used from the Library.